package com.itheima.idea;

public class Student3 {
    private String name;
    private int age;

    public Student3(){
        System.out.println("无参构造执行了");
    }


    public Student3(String name,int age){
        this.name = name;
        this.age = age;
        System.out.println("我是Student类的带参构造");
    }



    public String geName(){return name;}
    public void setName(String name){

        this.name = name;
    }

    public void setAge(int age){
        this.name = name;
    }
    public int getAge(){return age;}

    public void show(){
        System.out.println(name +"的年龄是"+age);
    }
}
